package designpattern.chainresponsibility.order;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: 刘牌
 * @Date: 2021/12/18/22:54
 * @Description:
 */
public class FreeOrderHandler extends OrderHandler{
    @Override
    public void hand(Order order) {
        if (order.isFreeOrder()){
            System.out.println("保存账单");
            return;
        }
        System.out.println("此订单未免单");
        orderHandler.hand(order);
    }
}
